package com.gexiao.expand.context;

import cn.hutool.core.lang.Console;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 测试ApplicationListener
 * @see org.springframework.context.ApplicationListener
 */
@Component
public class MyApplicationListener implements ApplicationListener<ApplicationEvent> {
    @Override
    public void onApplicationEvent(ApplicationEvent event) {
        Console.log("发布事件：{}",event);
    }
}
